﻿<!doctype html>
<html>
<head>
<#include "/part_meta.ftl">
<title>消息中心-迈小众</title>
<link href="${st.resDomain}/css/style.css" rel="stylesheet" type="text/css">
<link href="${st.resDomain}/css/store.css" rel="stylesheet" type="text/css">
<link href="${st.resDomain}/css/autostyle.css" rel="stylesheet" type="text/css">
<link href="${st.resDomain}/css/MyCenter.css" rel="stylesheet" type="text/css">
</head>

<body>
<!--头部-->
<header>
  <div class="boxw store">
    <div class="header">
      <span class="f_left"><a href="javascript:history.back();" class="back"></a></span>
      <span class="title">消息中心</span>
      <span class="f_right"><a class="more"></a></span>
    </div>
    <div class="more">
      <a href="${st.userDomain}/shoppingCart" class="icon-car">购物车</a>
      <a href="${st.userDomain}/" class="icon-user">个人中心</a>
      <a href="${st.domain}/" class="icon-home">主页</a>
    </div>
  </div>
</header>
<!--头部 END-->

<div class="main boxw">
 <div class="notice">
 <#list memberNoticeList as mn>
  <div class="box" id="div_mn_${mn.notice.noticeId}">
    <h2><span>${mn.notice.addTime?number_to_date}</span>系统消息</h2>
    <p>${mn.notice.content}</p>
    <h2><span><a href="javascript:;" id="del_mn_${mn.notice.noticeId}" style="color:red">删除</a></span></h2>
  </div>
 </#list>
 <div <#if memberNoticeList?size gt 0>style="display:none;"</#if> class="box">暂时没有通知哦</div> 
 </div>
</div>
<script src="${st.resDomain}/scripts/jquery-1.9.1.min.js"></script>
<script src="${st.resDomain}/scripts/com.js"></script>
<script type="text/javascript">
	//删除通知请求地址
	var deleteMnPath = g_userDomain + "/memberNotice/delDo/json";
	
	// 事件：删除通知
	$("[id^='del_mn_']").click(function(){
		var noticeId = $(this).attr("id").split("_")[2];
		if (confirm("确定要删除此通知吗?")) {
			showMsg("正在删除...", "load");
			$.post(deleteMnPath, {noticeIds: noticeId}, function(data){
				if (data.status !== 0) {
					showMsg(data.massage, 'error');
					return;
				}
				showMsg("删除成功", 'pass');
				setTimeout(function() {
					$("#div_mn_" + noticeId).attr("style", "display:none;");
				},2000);
			});
		}
	});
</script>
</body>
</html>
